﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="EditCaseContactor.aspx.cs"
    Inherits="Cases_EditCaseContactor" %>

<%@ Register Src="ucEditApplicantForCase.ascx" TagName="ucEditApplicantForCase" TagPrefix="uc1" %>
<%@ Register src="ucCaseNav.ascx" tagname="ucCaseNav" tagprefix="uc2" %>
<%@ Register src="../Customer/ucEditContactor.ascx" tagname="ucEditContactor" tagprefix="uc3" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>编辑案件联系人</title>
    <link href="../css/f_css.css" rel="Stylesheet" type="text/css" />
    <link href="../css/listpage.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .hr
        {
            border:1px solid #ADA3A5;
            width:99%;
        }
        .singleline
        {
            width:180px;
        }
        .td_title
        {
            text-align:right; padding-right:10px; vertical-align:middle;
        }
        #divAdd div.unselected
        {
            border:1px solid #ccc;
            min-height:80px;
        }
        #divAdd div.selectedmode
        {
            border:1px solid #ccc;
            background:#f3f3f3;
            min-height:80px;
        }
        div.addApp
        {
            height:auto!important; min-height:15px; padding:5px; border:#bfd5ec solid 0px;margin-left:1px; margin-right:1px; background-color:#d6e2f6;
        }
        #gvApp th
        {
            border:none;
        }
        #gvApp td
        {
            border-top:none;
            border-left:none;
            border-right:none;
            border-bottom:solid 1px #EEEEEE;
        }
        .right
        {
            float: right;
        }
    </style>
    <script language="javascript" src="../js/jquery-1.2.6.pack.js" type="text/javascript"></script>
    <script language="javascript" src="../js/common.js" type="text/javascript"></script>
    <script language="javascript" src="../js/subMsg.js" type="text/javascript"></script>
    <script language="javascript" src="../js/radio-divlist.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        var radioDivListObj = null;
        $(document).ready(
            function() {
                radioDivListObj = new RadioDivList("divAdd", "div");
            }
        );
        function showGetContactorDlg() {
            var url = "Customer/GetCustomerContactorDlg.aspx?customer=<%= CustomerID %>";
            window.parent.document.openDialog(url, "选择联系人", getCustomerCallBack, 700, 400);
        }
        function getCustomerCallBack(type, key, value) {
            if (type == 1) {
                getx("hfAddedCustoemrID").value = value.id;
                getElementAndClick("btnGetContactor");
            }
        }
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div class="titleText">
        案件登记 - 联系人信息 (<asp:Label runat="server" ID="lblCaseName"></asp:Label>)
    </div>
    <div class="btdiv2">
        <asp:Button ID="btnSave" runat="server" CssClass="input00" Text="下一步" 
            OnClick="btnSave_Click" />
        <a href="javascript:void(0);" onclick="javascript:showGetContactorDlg();">从现有联系人中添加</a>
        <asp:HiddenField runat="server" ID="hfAddedCustoemrID" />
        <asp:Button runat="server" ID="btnGetContactor" CssClass="hidden" 
            Text="选择联系人 - inner" onclick="btnGetContactor_Click" />
    </div>
    <table style="width:100%;">
    <tr><td>
        <div style="min-height:60px; padding-right:3px;">
        <asp:GridView runat="server" CssClass="table2" Width="100%" ID="gvApp" AutoGenerateColumns="false">
        <Columns>
            <asp:BoundField DataField="Name" HeaderText="姓名" />
            <asp:BoundField DataField="Name_En" HeaderText="英文名" />
            <asp:BoundField DataField="IDCode" HeaderText="身份证号" />
            <asp:BoundField DataField="Address" HeaderText="地址" />
            <asp:BoundField DataField="Zipcode" HeaderText="邮编" />
            <asp:BoundField DataField="Tel" HeaderText="电话" />
            <asp:BoundField DataField="CreateDate" DataFormatString="{0:yyyy-M-d}" HeaderText="创建时间" />
            <asp:TemplateField>
                <ItemTemplate>
                    <asp:LinkButton runat="server" ID="lblEdit" Text="编辑" CommandArgument='<%# Container.DataItemIndex %>'
                        OnCommand="lblEdit_Command"></asp:LinkButton>
                    <asp:LinkButton runat="server" ID="lblDelete" Text="删除" CommandArgument='<%# Container.DataItemIndex %>' OnCommand="lblDelete_Command"
                        OnClientClick="javascript:if(!confirm('确认删除联系人吗？')){event.cancelBubble = true; return false;};"></asp:LinkButton>
                    <asp:LinkButton runat="server" ID="lkDeleteAppInfo" Text="删除联系人" CommandArgument='<%# Container.DataItemIndex %>' OnCommand="lblDeleteDetailInfo_Command"
                        OnClientClick="javascript:if(!confirm('将删除联系人的信息，确认删除吗？')){event.cancelBubble = true; return false;};"></asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <HeaderStyle CssClass="listhead" />
        <AlternatingRowStyle CssClass="alt" />
        </asp:GridView>
        <asp:Label runat="server" ID="lblNoRecordMsg" Visible="false">无记录</asp:Label>
        </div>
        <br />
        <div class="addApp">
        <h4>
            新建联系人</h4></div>
        <div style="padding:5px;">
            <uc3:ucEditContactor ID="ucContactor" runat="server" OnContactorAdded="ucContactor_OnContactorAdded" />
        </div>
    </td>
    <td style="width:160px;  background:#eee; vertical-align:top; padding:10px 0 0 10px;">
        
        <uc2:ucCaseNav ID="ucCaseNav1" runat="server" />
        
    </td>
    </tr></table>
    </form>
</body>
</html>
